Jerry's Blogs

Tuesday, October 16, 2007

On Learning Cocoa and OS X Development

It's an exciting time to learn to develop on the OS X platform. Apple's doing great as a company with lots of fresh new products, more people are switching to Macs, and OSX 10.5 Leopard will be coming out anyday now... (knock on wood). I've been meaning to the development environment on the Mac for a while now, but have put it off because of laziness and getting p0wn3d in various classes. Thankfully, this semester has been super chill so far (double knock on wood), leaving me with enough time to sleep lots, and learn Cocoa.

Cocoa is a programming framework that consists of 3 often used frameworks: ApplicationKit (a.k.a AppKit), Foundation, and CoreData. AppKit gives you all the GUI controls, and Foundation gives you all the basic data structures and tools. I haven't gotten to CoreData yet. It's about 5 weeks into the semester, and I'm about a third of the way through Cocoa(R) Programming for Mac(R) OS X. I've just been going chapter by chapter and doing all the examples. The books is great because it's split into very short lessons that are conversational. It's easy to just do a chapter or a few sections within a chapter every other day.

There are just somethings I'm really having a good time with while I'm learning this.

  • Objective-C was a breeze to pick up since it's just C with some syntactic sugar
  • Memory management is fun! ... in a sadistic way. I squashed my first memory bug today where I was trying to send a message to an object that was already deallocated.
  • I really like the prevalent use of the delegate pattern in the frameworks and how well integrated it is with the UI controls
  • Interface Builder rocks my socks off. I like how UI controls are actually instantiated, and serialized to a nib file rather than instantiated and generated at runtime. This way, when an app starts up, it can just auto un-serialize the appropriate nibs. I also really dig how IB will draw guidelines in your GUI layout to suggest how you can conform to Apple's Human Interface Guidelines
  • I like how there's static typing and dynamic typing, and I REALLY like the dynamic behavior you can get with messaging tricks at runtime. Think selectors, forwardInvocation, and nil responding to all messages.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home